<?php
/**
 * Created by PhpStorm.
 * User: junyv
 * Date: 2017/4/22
 * Time: 15:43
 */
function getHousePrice($key=''){
    $data = [
        1 => ['name'=>'5000以下','value'=>[0,5000]],
        2 => ['name'=>'5000-8000','value'=>[5000,8000]],
        3 => ['name'=>'8000-10000','value'=>[8000,10000]],
        4 => ['name'=>'10000-15000','value'=>[10000,15000]],
        5 => ['name'=>'15000以上','value'=>'15000']
    ];
    if($key){
        if($key == 5){
            $str = ['egt',$data[$key]['value']];
        }else{
            $str = ['between',$data[$key]['value']];
        }
    }else{
        $str = $data;
    }
    return $str;
}
function getHuxingPrice($key=''){
    $data = [
        1 => ['name' => '50万以下', 'value' => [0, 50]],
        2 => ['name' => '50-80万', 'value' => [50, 80]],
        3 => ['name' => '80-100万', 'value' => [80, 100]],
        4 => ['name' => '100-150万', 'value' => [100, 150]],
        5 => ['name' => '150-200万', 'value' => [150, 200]],
        6 => ['name' => '200-300万', 'value' => [200, 300]],
        7 => ['name' => '300万以上', 'value' => '300']
    ];
    if ($key) {
        if ($key == 7) {
            $str = ['egt', $data[$key]['value']];
        } else {
            $str = ['between', $data[$key]['value']];
        }
    } else {
        $str = $data;
    }
    return $str;
}
function getRoom($key=''){
    $data = [
        1 => '一室',
        2 => '二室',
        3 => '三室',
        4 => '四室',
        5 => '五室以上'
    ];
    if ($key) {
        if ($key == 5) {
            $str = ['egt', $key];
        } else {
            $str = $key;
        }
    } else {
        $str = $data;
    }
    return $str;
}
function getSecondPrice($key='')
{
    $data = [
        1 => ['name' => '20万以下', 'value' => [0, 20]],
        2 => ['name' => '20-40万', 'value' => [20, 40]],
        3 => ['name' => '40-60万', 'value' => [40, 60]],
        4 => ['name' => '60-80万', 'value' => [60, 80]],
        5 => ['name' => '80-120万', 'value' => [80, 120]],
        6 => ['name' => '120-200万', 'value' => [120, 200]],
        7 => ['name' => '200万以上', 'value' => '200']
    ];
    if ($key) {
        if ($key == 7) {
            $str = ['egt', $data[$key]['value']];
        } else {
            $str = ['between', $data[$key]['value']];
        }
    } else {
        $str = $data;
    }
    return $str;
}